Skip to content

Conversation

tkw1536
Copy link

@tkw1536 tkw1536 commented Oct 4, 2025

Previously, the InlineComment sniff flagged inline DocBlocks as long as they did not contain a '@var' tag. As noted in #3367776 it is desirable to also allow other (possibly custom) docblock tags.

This commit updates InlineCommentSniff.php to allow any inline doc blocks that start with a doc comment tag, e.g. /** @var */. Any trailing content is allowed, however the docblock tag must be first.

This commit also adds appropriate test cases to InlineCommentSniff.php.

Previously, the InlineComment sniff flagged inline DocBlocks as long as
they did not contain a '@var' tag. As noted in #3367776, it is desirable
to also allow other (possibly custom) docblock tags.

This commit updates InlineCommentSniff.php to allow any inline doc
blocks that start with a doc comment tag, e.g. /** @var */. Any trailing
content is allowed, however the docblock tag must be first.

This commit also adds appropriate test cases to InlineCommentSniff.php.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant